package topin.facecat.FaceCat.UI

import facecat.topin.core.FCTran
import facecat.topin.grid.FCGridDoubleCell

class FCGridUnitDoubleCell : FCGridDoubleCell() {
    init {
        digit = 2
    }

    override fun getPaintText(): String {
        val value = double
        return if (value >= 10000000) {
            FCTran.getValueByDigit(value / 10000000, 2) + "亿"
        } else if (value >= 10000) {
            FCTran.getValueByDigit(value / 10000, 2) + "万"
        } else {
            FCTran.getValueByDigit(value, 2)
        }
    }
}